package com.patterns.design.security.web.security;

import java.io.InputStream;

import org.owasp.esapi.reference.DefaultSecurityConfiguration;

public class CustomEsapiConfiguration extends DefaultSecurityConfiguration{
	
	public java.io.InputStream getResourceStream(java.lang.String filename) throws java.io.IOException{
		InputStream is=null;
		try{
			is=super.getResourceStream(filename);
		}catch(Exception e){
			//Sometime you don't like the original configuration.
		}
		if(is==null){
			is=CustomEsapiConfiguration.class.getClassLoader().getResourceAsStream(filename);
		}
		if(is==null){
			is=CustomEsapiConfiguration.class.getClassLoader().getSystemResourceAsStream(filename);
		}		
		return is;
	}
	
}
